Click or drag to resize

ResourceUploadFile Method (String, String)

Uploads a local file to a resource with the specified URI.

Namespace:  Independentsoft.Webdav
Assembly:  Independentsoft.Webdav (in Independentsoft.Webdav.dll) Version: 1.0.700.18437
Syntax
public FileUpload UploadFile(
	string address,
	string fileName
)

Parameters

address
Type: SystemString
The URI of the resource to receive the file.
fileName
Type: SystemString
The file to send to the resource.

Return Value

Type: FileUpload
Examples
The following example demonstrates how to use this method:
//Upload file
public void Upload()
{
    resource.UploadProgress += new UploadProgressEventHandler(UploadProgress);
    resource.UploadFile(remoteFile, localFile);
}

//Display progress
private void UploadProgress(Object sender,ProgressEventArgs e)
{
    Console.WriteLine(e.Progress);
}
See Also